package cn.wolfcode.wolf2w.query;

import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import org.springframework.util.StringUtils;

@Getter
@Setter
@ToString
public class QueryObject {
    public static final int ORDER_NEW = 1;
    public static final int ORDER_HOT = 2;

    //当前页码
    private int currentPage=1;
    //页面数据显示量
    private int pageSize=5;
    //关键字
    private String keyword;

    private int orderType;

    public String getKeyword(){
        if(!StringUtils.hasLength(keyword)){
            return null;
        }
        return keyword;
    }
}
